﻿// dllmain.cpp : 定义 DLL 应用程序的入口点。
#include "pch.h"
#include "Tool.h"

BOOL APIENTRY DllMain(HMODULE hModule,
    DWORD  ul_reason_for_call,
    LPVOID lpReserved
)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH: {
        std::cout << "DLL Process Init" << std::endl;
        break;
    }
    case DLL_THREAD_ATTACH: {
        std::cout << "DLL Thread Init" << std::endl;
        break;
    }
    case DLL_THREAD_DETACH: {
        std::cout << "DLL Thread Exit" << std::endl;
        break;
    }
    case DLL_PROCESS_DETACH: {
        std::cout << "DLL Process Exit" << std::endl;
        break;
    }
    }
    return TRUE;
}

TDateTime GetDateTime() {
    SYSTEMTIME time;
    GetSystemTime(&time);
    TDateTime t{
        time.wYear,
        time.wMonth,
        time.wDay,
        time.wHour,
        time.wMinute,
        time.wSecond
    };
    std::cout << "DLL: Get System Time";
    return t;
}